package com.second.app.designpattern.rule.impl.kaibi.bad;

/**
 * @Author GYZ
 * @Date 2023/7/27
 * <pre>
 *
 * </pre>
 */
public class GraphicEditor {

    public void drawShape(Shape shape){
        if(shape.m_shape==1){
            drawRectangle(shape);
        }
        else if(shape.m_shape==2){
            drawCircle(shape);
        }
        else if(shape.m_shape==3){
            drawTriangle(shape);
        }
    }

    private void drawTriangle(Shape shape) {
        System.out.println("绘制三角形");
    }

    private void drawCircle(Shape shape) {
        System.out.println("绘制圆");
    }

    private void drawRectangle(Shape shape) {
        System.out.println("绘制矩形");
    }
}
